/**
 * 
 */
package com.thinkgsp.jxc.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * 产品的药品属性
 * @author evan
 *
 */
public class ProductMedicineProperties extends BaseModel implements
		Serializable {

	private static final long serialVersionUID = 6526710800415966529L;

	/**
	 * 产品ID
	 */
	private Integer productId;
	/**
	 * 存储条件
	 */
	private String storageConditions;
	/**
	 * 剂型
	 */
	private String dosageform;
	/**
	 * OTC
	 */
	private Boolean otc;
	/**
	 * 医保类型(甲，乙、自费)
	 */
	private String yibao;
	/**
	 * 医保项目ID
	 */
	private String ybItemCode;
	/**
	 * 有效期(月)
	 */
	private Integer expiredPeriod;
	/**
	 * 是否基本药物
	 */
	private Boolean essentialDrug = false;
	/**
	 * SFDA 编码
	 */
	private String sfdaCode;
	/**
	 * 是否首营品种
	 */
	private Boolean firstDeal = false;
	/**
	 * 是否监管产品
	 */
	private Boolean drugAdmin = false;
	
	
	
	/**
	 * 产品ID
	 * @return
	 */
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	/**
	 * 存储条件
	 * @return
	 */
	public String getStorageConditions() {
		return storageConditions;
	}

	/**
	 * 存储条件
	 * @param storageConditions
	 */
	public void setStorageConditions(String storageConditions) {
		this.storageConditions = storageConditions;
	}

	/**
	 * 剂型
	 * @return
	 */
	public String getDosageform() {
		return dosageform;
	}

	public void setDosageform(String dosageform) {
		this.dosageform = dosageform;
	}

	/**
	 * OTC 类型
	 * @return
	 */
	public Boolean isOtc() {
		return otc;
	}

	public void setOtc(Boolean otc) {
		this.otc = otc;
	}

	/**
	 * 医保类型
	 * @return
	 */
	public String getYibao() {
		return yibao;
	}

	public void setYibao(String yibao) {
		this.yibao = yibao;
	}

	/**
	 * 医保项目ID
	 * @return
	 */
	public String getYbItemCode() {
		return ybItemCode;
	}

	public void setYbItemCode(String ybItemCode) {
		this.ybItemCode = ybItemCode;
	}

	/**
	 * 有效期(月)
	 * @return
	 */
	public Integer getExpiredPeriod() {
		return expiredPeriod;
	}

	public void setExpiredPeriod(Integer expiredPeriod) {
		this.expiredPeriod = expiredPeriod;
	}

	/**
	 * 是否基本药物
	 * @return
	 */
	public Boolean getEssentialDrug() {
		return essentialDrug;
	}

	public void setEssentialDrug(Boolean essentialDrug) {
		this.essentialDrug = essentialDrug;
	}

	/**
	 * sfda 编码
	 * @return
	 */
	public String getSfdaCode() {
		return sfdaCode;
	}

	public void setSfdaCode(String sfdaCode) {
		this.sfdaCode = sfdaCode;
	}

	/**
	 * 是否首营产品
	 * @return
	 */
	public Boolean getFirstDeal() {
		return firstDeal;
	}

	public void setFirstDeal(Boolean firstDeal) {
		this.firstDeal = firstDeal;
	}

	/**
	 * 是否监管产品
	 * @return
	 */
	public Boolean getDrugAdmin() {
		return drugAdmin;
	}

	public void setDrugAdmin(Boolean drugAdmin) {
		this.drugAdmin = drugAdmin;
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.model.BaseModel#toString()
	 */
	@Override
	public String toString() {
		ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE);
		sb.append("storageConditions",this.storageConditions)
		  .append("dosageform",this.dosageform)
		  .append("otc",this.otc)
		  .append("yibao",this.yibao)
		  .append("ybItemCode",this.ybItemCode)
		  .append("expiredPeriod",this.expiredPeriod)
		  .append("essentialDrug",this.essentialDrug)
		  .append("sfdaCode",this.sfdaCode)
		  .append("firstDeal",this.firstDeal)
		  .append("drugAdmin",this.drugAdmin);
		
		return sb.toString();
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.model.BaseModel#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object o) {
		if(this == o) {
			return true;
		}
		if(!(o instanceof ProductMedicineProperties)) {
			return false;
		}
		final ProductMedicineProperties pmp = (ProductMedicineProperties)o;
		if(productId != null) {
			return productId.equals(pmp.getProductId());
		} else {
			return pmp.getProductId() == null;
		}
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.model.BaseModel#hashCode()
	 */
	@Override
	public int hashCode() {
		return (this.productId != null ? this.productId.hashCode() : 0);
	}

}
